# 导包
import requests

# 创建session对象
session = requests.session()

# 获取图片验证码
response = session.get(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=verify")

# 查看字节码响应数据（图片、视频、音频等）
print(response.content)

# 将响应数据写入文件
with open("verify.png", "wb") as f:
    f.write(response.content)

